package com.ynet.middleground.user.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.ynet.core.common.BaseReqObj;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * SendSmsReq 发送短信请求信息
 *
 * @author liulx
 * @date 2022/12/19 10:16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "发送短信请求信息", description = "发送短信请求信息")
public class SendSmsReq extends BaseReqObj {

    private static final long serialVersionUID = -8865569070765390420L;

    @ApiModelProperty(value = "应用 id（短信账户）", notes = "应用 id（短信账户）", dataType = "String", required = true)
    @NotBlank(message = "应用 id（短信账户）不能为空")
    private String appId;

    @ApiModelProperty(value = "应用密钥（短信账户）", notes = "应用密钥（短信账户）", dataType = "String", required = true)
    @NotBlank(message = "应用密钥（短信账户）不能为空")
    private String appSecret;

    @ApiModelProperty(value = "接口短信签名（非签名 id），如：【天猫】", notes = "接口短信签名（非签名 id），如：【天猫】", dataType = "String",
        required = true)
    @NotBlank(message = "接口短信签名不能为空")
    private String sign;

    @ApiModelProperty(value = "接收短信的手机号码 注：仅支持单个手机号码", notes = "接收短信的手机号码 注：仅支持单个手机号码",
        dataType = "String", required = true)
    @NotBlank(message = "接收短信的手机号码不能为空")
    @Size(min = 7, max = 20, message = "手机长度为 7～20 位")
    private String mobile;

    @ApiModelProperty(value = "发送的短信内容",
        notes = "发送的短信内容\n" + "短信内容过长实际会按多条短信发送。\n" + "短信条数标准：\n" + "\n" + "<=70字为一条，>70字按字数除以67计算，余数进一\n"
            + "例： 1、 70 字 扣费1条\n" + "   2、 134字 扣费2条 134/67=2\n" + "   3、 135字 扣费3条 135/67=2.0149",
        dataType = "String", required = true)
    @NotBlank(message = "发送的短信内容不能为空")
    private String content;

    @ApiModelProperty(value = "业态（仅限综合管理平台使用）", notes = "业态（仅限综合管理平台使用）", dataType = "Integer")
    private Integer formatId;

}
